package demo3;

import demo3.OutClass1.Inclass;
import jdk.swing.interop.SwingInterOpUtils;
class OutClass1 {

    public int data1 = 1;
    private int data2 = 2;
    public static int data3 = 3;

    static class Inclass {
        public int data4 = 4;
        private int data5 = 5;
        public static int data6 = 6;


        public  void Test() {
            OutClass1 outClass1 = new OutClass1();
            System.out.println(outClass1.data1);
            System.out.println(data3);
            System.out.println(data4);
            System.out.println(data5);
            System.out.println(data6);


        }
    }
}
class OutClass2 {
    public int data1 = 1;
    private int data2 = 2;
    public static int data3 = 3;


    class InClass2 {
        public int data1 = 1000;

        public int data4 = 4;

        private int data5 = 5;

        public static int data6 = 6;

        public void test() {
            OutClass2 outClass2 = new OutClass2();
            System.out.println(outClass2.data1);
            System.out.println(OutClass2.this.data1);
            System.out.println(this.data1);
            System.out.println(data4);
            System.out.println(data5);
            System.out.println(data6);

        }
    }
}

class Out {
    public void test1() {
        System.out.println("haha");
    }
}
interface IAa {
    void test1();
}

    public class Outclass {
        public static void main(String[] args) {
//            IAa a = new IAa() {
//                @Override
//                public void test1() {
//                    System.out.println("haaaaah");
//                }
//            };
//            a.test1();
        }
            public void testMethod() {
                //局部内部类
                class In {
                    public int data1;

                    public void func() {

                        System.out.println("func。。。。");
                    }
                }

                In inr = new In();
                inr.func();
            }

//        public static void main(String[] args) {
//            OutClass2 outClass2 = new OutClass2();
//            OutClass2.InClass2 inClass2 = outClass2.new InClass2();
//            inClass2.test();
//        }
//
        public static void main1(String[] args) {
            OutClass1.Inclass inClass = new OutClass1.Inclass();
            inClass.Test();

        }
    }

